<template>
  <div id="storageTransfer" >
    <!--右上角按钮-->
    <div style='position:absolute;right:2%;top:10%;z-index: 99'>
      <div class='top_button_box'>
        <i style="margin-left:5px;color: white;font-size: 30px;opacity: 0.5;z-index: 98" @click="fullScreen" class="el-icon-full-screen"></i>
      </div>
    </div>


    <div id="entirety" style="background-image: url('/static/background/background.png');padding-bottom: 10px">
      <div style='display: flex;display: -webkit-flex;justify-content: center'>
        <el-input placeholder="请输入主机ID" v-model="searchId" style='width: 40%;margin-top: 3vh'>
        </el-input>
        <el-button type="primary" icon="el-icon-search" @click='searchHost' style='margin-top: 3vh'></el-button>
      </div>
      <div class='cardDiv'>
        <el-row :gutter='30'>
          <el-col :span=12>
              <el-card class='chart_card'>
                <div style='display: flex;display: -webkit-flex;justify-content: center'>
                  <div class="title_class" style='margin-top: 10px'>CPU</div>
                </div>
                <el-row>
                  <el-col :span='15'>
                    <div style='width: 100%;padding-left:20px'>
                      <div id='CPUChart' style="height: 30vh"> </div>
                    </div>
                  </el-col>
                  <el-col :span='9'>
                    <div class='description1'>
                      <el-descriptions :column="2" direction="vertical">
                        <el-descriptions-item label="利用率">{{hostInfoShow.cpu['useRatio']}}</el-descriptions-item>
                        <el-descriptions-item label="速度">{{hostInfoShow.cpu['speed']}}</el-descriptions-item>
                        <el-descriptions-item label="进程">{{hostInfoShow.cpu['process']}}</el-descriptions-item>
                        <el-descriptions-item label="线程">{{hostInfoShow.cpu['thread']}}</el-descriptions-item>
                        <el-descriptions-item label="句柄">{{hostInfoShow.cpu['handle']}}</el-descriptions-item>
                        <el-descriptions-item label="正常运行时间">{{hostInfoShow.cpu['operationTime']}}</el-descriptions-item>
                      </el-descriptions>
                    </div>
                  </el-col>
                </el-row>
                <div class='description2'>
                  <el-descriptions :column="4">
                    <el-descriptions-item label="基准速度">{{hostInfoShow.cpu['referenceSpeed']}}</el-descriptions-item>
                    <el-descriptions-item label="插槽">{{hostInfoShow.cpu['slot']}}</el-descriptions-item>
                    <el-descriptions-item label="内核">{{hostInfoShow.cpu['kernel']}}</el-descriptions-item>
                    <el-descriptions-item label="逻辑处理器">{{hostInfoShow.cpu['logicProcessor']}}</el-descriptions-item>
                    <el-descriptions-item label="虚拟化">{{hostInfoShow.cpu['virtualization']}}</el-descriptions-item>
                    <el-descriptions-item label="L1 缓存">{{hostInfoShow.cpu['l1']}}</el-descriptions-item>
                    <el-descriptions-item label="L2 缓存">{{hostInfoShow.cpu['l2']}}</el-descriptions-item>
                    <el-descriptions-item label="L3 缓存">{{hostInfoShow.cpu['l3']}}</el-descriptions-item>
                  </el-descriptions>
                </div>
              </el-card>
              <el-card class='chart_card'>
                <div style='display: flex;display: -webkit-flex;justify-content: center'>
                  <div class="title_class" style='margin-top: 10px'>磁盘</div>
                </div>
                <el-row>
                  <el-col :span='15'>
                    <div style='width: 100%;padding-left:20px'>
                      <div id='diskChart' style="height: 30vh"> </div>
                    </div>
                  </el-col>
                  <el-col :span='9'>
                    <div class='description1'>
                      <el-descriptions :column="2" direction="vertical" style='margin-top: 4vh'>
                        <el-descriptions-item label="活动时间">{{hostInfoShow.disk['activeTime']}}</el-descriptions-item>
                        <el-descriptions-item label="平均响应时间">{{hostInfoShow.disk['argResponseTime']}}</el-descriptions-item>
                        <el-descriptions-item label="读取速度">{{hostInfoShow.disk['readSpeed']}}</el-descriptions-item>
                        <el-descriptions-item label="写入速度">{{hostInfoShow.disk['writeSpeed']}}</el-descriptions-item>
                      </el-descriptions>
                    </div>
                  </el-col>
                </el-row>
                <div class='description2'>
                  <el-descriptions :column="3">
                    <el-descriptions-item label="容量">{{hostInfoShow.disk['capacity']}}</el-descriptions-item>
                    <el-descriptions-item label="已格式化">{{hostInfoShow.disk['formatted']}}</el-descriptions-item>
                    <el-descriptions-item label="系统磁盘">{{hostInfoShow.disk['systemDisk']}}</el-descriptions-item>
                    <el-descriptions-item label="页面文件">{{hostInfoShow.disk['pageFile']}}</el-descriptions-item>
                    <el-descriptions-item label="类型">{{hostInfoShow.disk['type']}}</el-descriptions-item>
                  </el-descriptions>
                </div>
              </el-card>
          </el-col>
          <el-col :span=12>
            <el-card class='chart_card'>
              <div style='display: flex;display: -webkit-flex;justify-content: center'>
                <div class="title_class" style='margin-top: 10px'>内存</div>
              </div>
              <el-row>
                <el-col :span='15'>
                  <div style='width: 100%;padding-left:20px'>
                    <div id='memoryChart' style="height: 30vh"> </div>
                  </div>
                </el-col>
                <el-col :span='9'>
                  <div class='description1'>
                    <el-descriptions :column="2" direction="vertical" >
                      <el-descriptions-item label="使用中">{{hostInfoShow.memory['using']}}</el-descriptions-item>
                      <el-descriptions-item label="可用">{{hostInfoShow.memory['usable']}}</el-descriptions-item>
                      <el-descriptions-item label="已提交">{{hostInfoShow.memory['submitted']}}</el-descriptions-item>
                      <el-descriptions-item label="已缓存">{{hostInfoShow.memory['cache']}}</el-descriptions-item>
                      <el-descriptions-item label="分页缓冲池">{{hostInfoShow.memory['pagingBuffer']}}</el-descriptions-item>
                      <el-descriptions-item label="非分页缓冲池">{{hostInfoShow.memory['nonPagingBuffer']}}</el-descriptions-item>
                    </el-descriptions>
                  </div>
                </el-col>
              </el-row>
              <div class='description2'>
                <el-descriptions :column="2">
                  <el-descriptions-item label="速度">{{hostInfoShow.memory['speed']}}</el-descriptions-item>
                  <el-descriptions-item label="已使用的插槽">{{hostInfoShow.memory['usedSlot']}}</el-descriptions-item>
                  <el-descriptions-item label="外形规格">{{hostInfoShow.memory['shape']}}</el-descriptions-item>
                  <el-descriptions-item label="为硬件保留的内存">{{hostInfoShow.memory['reservedMemory']}}</el-descriptions-item>
                </el-descriptions>
              </div>
            </el-card>
            <el-card class='chart_card'>
              <div style='display: flex;display: -webkit-flex;justify-content: center'>
                <div class="title_class" style='margin-top: 10px'>以太网</div>
              </div>
              <el-row>
                <el-col :span='15'>
                  <div style='width: 100%;padding-left:20px'>
                    <div id='networkChart' style="height: 30vh"> </div>
                  </div>
                </el-col>
                <el-col :span='9'>
                  <div class='description1'>
                    <el-descriptions :column="1" direction="vertical" style='margin-top: 4vh;margin-left: 40%'>
                      <el-descriptions-item label="发送">{{hostInfoShow.network['send']}}</el-descriptions-item>
                      <el-descriptions-item label="接收">{{hostInfoShow.network['receive']}}</el-descriptions-item>
                    </el-descriptions>
                  </div>
                </el-col>
              </el-row>
              <div class='description2'>
                <el-descriptions :column="2">
                  <el-descriptions-item label="适配器名称">{{hostInfoShow.network['adapter']}}</el-descriptions-item>
                  <el-descriptions-item label="连接类型">{{hostInfoShow.network['connectType']}}</el-descriptions-item>
                  <el-descriptions-item label="IPv4地址">{{hostInfoShow.network['IPv4']}}</el-descriptions-item>
                  <el-descriptions-item label="IPv6地址">{{hostInfoShow.network['IPv6']}}</el-descriptions-item>
                </el-descriptions>
              </div>
            </el-card>
          </el-col>
        </el-row>

      </div>

    </div>

  </div>
</template>

<script src='./js/index.js'>
</script>
<style lang="scss">
@font-face {
  font-family: 'Alternate';
  //src: url('../../assets/iconfont/Alternate.ttf');
  font-style: normal;
  font-width: normal;
}

@import './css/storageTransfer.scss';
</style>
